<?php

namespace App\Http\Requests\User;


class LoginRequest extends FormRequest
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'username'  =>  'required',
            'password'  =>  'required',
            //'vercode'   =>  'required|captcha',
        ];
    }

    public function messages()
    {
        return [
            'username.required' =>  '帐号不可为空',
            'password.required' =>  '密码不可为空',
            'vercode.required'  =>  '验证码不可为空',
            'vercode.captcha'   =>  '验证码不正确',
        ];
    }
}
